package com.me.model.viewmodel;

import com.me.model.Goods;

import java.util.Collection;

public class GoodsPageViewModel {
    private Collection<Goods> goods;
    private String type;//类型
    private int page;//第几页
    private int count;//商品总数
    private int size;//每页多少个
    private int total;//页面总数
    private String typeName;

	public GoodsPageViewModel() {
	}

	public GoodsPageViewModel(Collection<Goods> goods, String type, String typeName, int page, int count, int size) {
        this.goods = goods;
        this.type = type;
        this.typeName = typeName;
        this.page = page;
        this.count = count;
        this.size = size;
        total = (count-1) / size;
    }

    public Collection<Goods> getGoods() {
        return goods;
    }

    public void setGoods(Collection<Goods> goods) {
        this.goods = goods;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}
